//V0.1 2023.11.29

#ifndef SELFFUN_H
#define SELFFUN_H
#include "qglobal.h"

class selffun
{
public:
  static  quint8  hight_bit(quint8 a,quint8 b);
  static  quint8  low_bit(quint8 a,quint8 b);
  static  quint16 com_2uint8(quint8 a, quint8 b);
  static  quint32 com_4uint8(quint8 a, quint8 b,quint8 c,quint8 d);
  static  quint16 TakeOut_bit(quint8 a, quint8 b);
  static  quint8  hight16_hi(quint16 a); //取a的高8位
  static  quint8  hight16_low(quint16 a); //取a的高8位
  static  quint8  hight24_low(quint32 a);
  static  quint8  hight24_mid(quint32 a);
  static  quint8  hight24_hi(quint32 a);
  static  quint8  hight32_25_32(quint32 a);
  static  quint8  hight32_0_7(quint32 a);
  static  quint8  hight32_8_15(quint32 a);
  static  quint8  hight32_16_23(quint32 a);
  static  quint8  hight32_24_31(quint32 a);
  static  quint8  hid_quint8_1(quint8 data,quint8 par);//将data的第par位置1，从0开始
  static  quint8  hid_quint8_0(quint8 data,quint8 par);//将data的第par位置0，从0开始
  static  quint8  PutIn_Data(quint8 data,bool var,quint8 post);
  static  double  query_R134a(float u0, const double bp0[], const double table[], quint32 maxIndex);
  typedef struct {
      double R1340_Temp[67]; // R134a 包和液体和饱和气体性质表-温度
      double R1340_Pre[67]; // R134a 包和液体和饱和气体性质表-压力
  } Const_R134a_Physical_property;
  static Const_R134a_Physical_property PP_R134a;

};

#endif // SELFFUN_H
